<include file="Public:head" />
{$keshow}
</head>
<body>
<include file="Public:top" />
<div id="main">
    <div class="main-con">
        <div class="col-box col-sub">
            <h3><span>常用操作</span></h3>
			<ul>
                <li><a href="__APP__/User/arc_add.html">发布内容</a></li>
                <li class="focus"><i></i><a href="__APP__/User/cat.html">栏目管理</a></li>
                <li ><i></i><a href="__URL__/logout.html">退出</a></li>
              </ul>
		</div>

        <div class="col-box col-main">
            <h3><span class="fl">发布文章单页</span></h3>
            <div class="content">
<if condition="$arc_list">
<style type="text/css">
	.list{border:1px solid #CCC;}
	.list th,.list td{border:1px solid #CCC;}
</style>
      	<table width="100%" class="list">
        	<tr>
            	<th width="50">ID</th>
                <th>标题</th>
                <th width="100">文件名</th>
                <th width="100">时间</th>
                <th width="100">操作</th>
            </tr>
<php>
$page_arr=array(1,17,12,13,14);
</php>
<volist name="arc_list" id="c">
			<tr>
            	<td>{$c['id']}</td>
                <td><a href="__APP__/<if condition="in_array($c['cid'],$page_arr)">page/{$c['filename']}.html<else/>{$c['cid']|auto_url}/{$c['id']}.html</if>" target="_blank">{$c['title']}</a></td>
                <td>{$c['filename']}</td>
                <td>{$c['ctime']|toDate='Y-m-d'}</td>
                <td><a href="__URL__/arc_add/act/edit/id/{$c['id']}">编辑</a>  |  <a href="__URL__/arc_add/act/del/id/{$c['id']}">删除</a></td>
            </tr>
</volist>
        </table>
      <hr>
</if>
				 <form action="__URL__/arc_do" method="post" enctype="multipart/form-data">
                 	<if condition="$info['id']">
                    	<input type="hidden" name="id" value="{$info['id']}"/>
                    </if>
                    <if condition="$info['picture']">
                    	<input type="hidden" name="old_picture" value="{$info['picture']}"/>
                    </if>
                 	<p>
                    	<label for="title">标&nbsp;&nbsp;&nbsp;题:</label><input id="title" name="title" type="text" value="{$info['title']}">
                    </p>
                    <p>
                        <label for="cid">栏&nbsp;&nbsp;&nbsp;目:</label>
                        <select id="cid" name="cid">
                        <option value="0"{:arrayischk(0,$info['cid'],'selected')}>---顶级目录---</option>
                        <volist name="cat_list" id="v">
                        <if condition="$_GET['cid']">
                        <option value="{$v['id']}"{:arrayischk($v['id'],$_GET['cid'],'selected')}>{$v['type_name']}</option>
                        <else/>
                        <option value="{$v['id']}"{:arrayischk($v['id'],$info['cid'],'selected')}>{$v['type_name']}</option>
                        </if>
                        </volist>
                        </select>
                      </p>
                      <if condition="$_GET['cid'] eq '15'">
                      	
                      </if>
                      <p style="display:none;" id="other"></p>
                    <p>
                    	<label for="msg">摘&nbsp;&nbsp;&nbsp;要:</label><br /><textarea id="msg" name="msg" cols="85" rows="5">{$info['msg']}</textarea>
                    </p>
                    <p>
                    	<label for="content">内&nbsp;&nbsp;&nbsp;容:</label><br /><textarea id="content" name="content" cols="85" rows="20">{$info['content']}</textarea>
                        <input name="img" id="img" type="hidden" value="" />
                    </p>
                    <p>
                    	<input type="submit" value="提  交">
                    </p>
                 </form>
            </div>
        </div>
    </div>
</div>
<script language="javascript">
$(document).ready(function(){
	var cid=$("#cid").val();
	if(cid=='15'){
		 $("#other").html($("#cid15").html()).css('display','block');	
	}
	if(cid=='1'||cid=='12'||cid=='13'||cid=='17'){
		 $("#other").html($("#cid1").html()).css('display','block');	
	}
	$("#cid").change(function(){
		var id=$("#cid").val();
		
		switch(id){
		   case '15':
			 $("#other").html($("#cid15").html()).css('display','block');
			 break;
		   case '1':
			 $("#other").html($("#cid1").html()).css('display','block');
			 break;
			case '12':
			 $("#other").html($("#cid1").html()).css('display','block');
			 break;
			 case '13':
			 $("#other").html($("#cid1").html()).css('display','block');
			 break;
			 case '17':
			 $("#other").html($("#cid1").html()).css('display','block');
			 break;
		}
	});
});
</script>
<div style="display:none">
<p id="cid15">
	<label for="picture">文&nbsp;&nbsp;&nbsp;件:</label><input id="picture" name="picture" type="file"><br>
</p>
<p id="cid1">
	<label for="filename">文件名:</label><input id="filename" name="filename" type="text" value="{$info['filename']}">
</p>
</div>
<include file="Public:foot" />
